<?php
header("content-type:text/html;charset=utf-8");
$username=$_POST['username'];
$pwd=$_POST['pwd'];
$dsn="mysql:host=127.0.0.1;dbname=07c;charset=utf8";
$pdo=new PDO($dsn,'root','root');
$sql="insert into b1 VALUES('','$username','pwd')";
$res=$pdo->query($sql);
if($res){
    echo "<script>alert('登录成功');location.href='import.php'</script>";
}else{
    echo "<script>alert('登录失败');location.href='login.php'</script>";
}








?>